<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>规则设定  审批  客户调配审核</title>
<link href="${rc.contextPath}/common/css/common/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${rc.contextPath}/common/js/common.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/jquery.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/thickbox.js"></script>
<style type="text/css">
.deploy{border:solid 1px gray; width:700px; height:350px;display:none; z-index:101;position:absolute; background-color:#FFFFFF;}
.deploy .title{width:100%;height:20px;line-height:50px; border-top:solid 1px red;background-color:#b60613;top:0px;}
#greyBackGround{background:#000000;width:100%; display:none; z-index:100; top:0px; left:0px; position:absolute;}
</style>
<script type="text/javascript" src="${rc.contextPath}/common/js/main.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/ruleSet/approval/customDeployApproval.js"></script>
</head>
<body>
<div class="main">
	<div class="position">
		<div class="p_left">当前位置：规则设定   >  审批  >  客户调配审核</div>
		<div class="p_right">
	    	<dl><dt>姓名：</dt><dd>${currentUser.ename}</dd></dl>
	    	<dl><dt>登录时间：</dt><dd><span id="nowDate"></span></dd></dl>
	  	</div>
  	</div>
	<div class="topBox">
    	<div class="mesCheck">
      	<div class="title1"><strong>客户调配审核</strong></div>
   		<div class="box2C">
   		#if($shiro.hasPermission("客户调配审批条件查询"))
   		<div style="padding-left: 10px;" class="tableForm tab1"><br/>
   		
   		<form id="queryForm"  action="${rc.contextPath}/ruleSet/approval/customDeployApproval/getCustomMixAudit" method="post">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      		<input id="pageNow" name="pageNow" type="hidden"/>
      		会员编号:
      		#if(!$customerId)
      			<input id="customerId" name="customerId" type="text" value=""/>
      		#else
      			<input  id="customerId" name="customerId" type="text" value="$customerId"/>
      		#end&nbsp;&nbsp;&nbsp;&nbsp;
      		联系人:
      		#if(!$contact)
      			<input  id="contact" name="contact" type="text" value=""/>
      		#else
      			<input id="contact" name="contact" type="text" value="$contact"/>
      		#end&nbsp;&nbsp;&nbsp;&nbsp;
      		手机:
      		#if(!$phone)
      			<input id="phone" name="phone" type="text"/>
      		#else
      			<input id="phone" name="phone" type="text" value="$phone"/>
      		#end&nbsp;&nbsp;&nbsp;&nbsp;
      		电子邮箱:
      		#if(!$email)
      		<input id="email" name="email" type="text"/>
      		#else
      		<input id="email" name="email" type="text" value="$email" />
      		#end&nbsp;&nbsp;&nbsp;
      		<input id="queryBtn" type="button" value="查询" />&nbsp;&nbsp;&nbsp;&nbsp;
      		<input id="clean" type="button" value="清空"/>
      		<br/><br/>
		</form>
		</div>
		#end
		<form id="approveForm" action="${rc.contextPath}/ruleSet/approval/customDeployApproval/approval" method="post">
			<input id="idStr" name="idStr" type="hidden" />
			<input id="approveCusId" name="id" type="hidden" />
			<input id="approveIsEffect" name="isEffect" type="hidden" />
			<input id="productId" name="productId" type="hidden" />
			<input id="productCode" name="productCode"" type="hidden" />
		</form>
		<div style="overflow: scroll;">
      	<table  class="tab2" cellpadding="0" align="center" width="95%" style="text-align: center;">
  			<tr>
  				<th><input id="selectAll" onchange="selectAll()" type="checkbox"></input></th>
  				<th>会员编号</th>
  				<th>联系人</th>
  				<th>电子邮箱</th>
  				<th>手机</th>
  				<th>操作内容</th>
  				<th>调配原因</th>
  				<th>修改人</th>
  				<th>修改时间</th>
  				<th>操作</th>
  			</tr>
  			#foreach($customMixAudit in $pageView.records)
  			<tr>
  				<td>
  				#if($customMixAudit.isEffect==2)
  					<input id="bath_$!customMixAudit.id"  type="checkbox"/>
  				#end
  				</td>
  				<td>
	  				#if($customMixAudit.cusId)
	  					<a href="#" onclick="goCustomerDetail('$!customMixAudit.cusId')" >$!customMixAudit.cusId</a>
	  				#end
  				</td>
  				<td>#if($customMixAudit.cname)$!customMixAudit.cname#end</td>
  				<td>#if($customMixAudit.email)$!customMixAudit.email#end</td>
  				<td>#if($customMixAudit.phone)$!customMixAudit.phone#end</td>
  				<td>#if($customMixAudit.operationContent)$!customMixAudit.operationContent.split(",")[0]#end</td>
  				<td>#if($customMixAudit.mixCause)$!customMixAudit.mixCause#end</td>
  				<td>#if($customMixAudit.updateEname)$!customMixAudit.updateEname#end</td>
  				<td>#if($customMixAudit.updateTime)$!customMixAudit.updateTime#end</td>
  				<td>
  				#if($shiro.hasPermission("客户调配单个审批"))
	  				#if($customMixAudit.isEffect==2)
	  					<a href="javaScript:approve('$!customMixAudit.id',1,'$!customMixAudit.productId','$!customMixAudit.productCode')">通过</a>
	  					<a href="javaScript:approve('$!customMixAudit.id',0,'$!customMixAudit.productId','$!customMixAudit.productCode')">拒绝</a>
	  				#elseif($customMixAudit.isEffect==0)
	  					审核完成(被拒绝)
	  				#elseif($customMixAudit.isEffect==3)
	  					超时流转
	  				#elseif($customMixAudit.isEffect==1)
	  					审核完成(通过)
	  				#end
  				#end
  				</td>
  			</tr>
  			#end
		</table>
		</div><br/>
		#if($shiro.hasPermission("客户调配审批批量通过"))
   		 	<input onclick="bathApprove('1');" type="button" value="批量通过" style="margin-left: 20px;" />
   		 #end
   		 #if($shiro.hasPermission("客户调配审批批量拒绝"))
   			<input onclick="bathApprove('0');" type="button" value="批量拒绝" style="margin-left: 20px;" /> 
   		#end
   		
   		#if($shiro.hasPermission("全部批量调配"))
   		 	<input onclick="bathAllApprove('1','$!bathAllCusId');" type="button" value="全部批量通过" style="margin-left: 20px;" />
   		 #end
   		 #if($shiro.hasPermission("全部批量调配"))
   			<input onclick="bathAllApprove('0','$!bathAllCusId');" type="button" value="全部批量拒绝" style="margin-left: 20px;" /><br/>
   		#end


		<!-- #BeginLibraryItem "/Library/page.lbi" -->
			#set($pageNow=$pageView.pageNow)
			#set($pageNext=$pageView.pageNow+1)
			#if($pageView.pageNow==1)
				 #set($pageBack=$pageView.pageNow)
			#else
				 #set($pageBack=$pageView.pageNow - 1)
			#end
		    #set($startRecord=($pageNow*$pageView.pageSize)-$pageView.pageSize+1)
		    #set($endRecord=($pageNow*$pageView.pageSize))
	    <input type="hidden" value="${pageView.pageCount}" id="pageCount"/>
	    <div class="page clearfix">
	      <ul class="le">
	        <li>显示<span>${startRecord}-${endRecord}</span></li>
	        <li>共<span>${pageView.rowCount}</span>条</li>
	        <li><span>${pageView.pageNow}</span>页</li>
	      </ul>
	      <ul class="ri">
	        <li><a href="javascript:;configPageController('jump')" class="go">&nbsp;</a></li>
	        <li>到
	          <input type="text" class="input" id="pageJump" size="4" />
	          页</li>
	        <li><a href="javascript:;configPageController('${pageView.pageCount}')" class="btn">[末页]</a></li>
	        <li><a href="javascript:;configPageController('${pageNext}')" class="btn">[下页]</a></li>
	        <li><a href="javascript:;configPageController('${pageBack}')" class="btn">[前页]</a></li>
	        <li><a href="javascript:;configPageController('1')" class="btn">[首页]</a></li>
	      </ul>
	    </div>
	    <!-- #EndLibraryItem -->
	<script>
	//分页
	function configPageController(value) {
		var pageCount=$("#pageCount").val();
		if(value<1){
			value=1;
		}
		if(value=="jump"){
			value=$("#pageJump").val();
		}
		if(parseInt(value)>parseInt(pageCount)){
			value=pageCount;
		}
		if(!$isQuery){
			window.location="${rc.contextPath}/ruleSet/approval/customDeployApproval/customDeployApprovalPage?pageNow="+value;
		}else{
			$("#pageNow").val(value);
			$("#queryForm").submit();
		}	
	}
	</script>
   		<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
		</div>
		</div>
	</div>
	<form id="redirectForm"  action="${rc.contextPath}/ruleSet/approval/customDeployApproval/customDeployApprovalPage" method="get" style="display: none;">
		<input name="pageNow" type="hidden" value="$!pageView.pageNow"></input>
	</form>
</div>
</body>
</html>
